package com.wn55.hrms.mapper;

import com.wn55.hrms.entity.Trainer;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface TrainerMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Trainer record);

    Trainer selectByPrimaryKey(Integer id);

    List<Trainer> selectAll();

    int updateByPrimaryKey(Trainer record);

    @Update("update trainer set id=#{id},name=#{name},resource=#{resource},organization=#{organization} where id=#{id}")
    void update(Trainer trainer);

    List<Trainer> selectByName(String name);
}